<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Private Cloud: CPrivateCloud类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Private Cloud
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_c_private_cloud.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>类</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>类型定义</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">类</a> &#124;
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="class_c_private_cloud-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">CPrivateCloud类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_private_cloud_8h_source.html">PrivateCloud.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
类</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_c_private_cloud_1_1___c_a_l_l_b_a_c_k___i_t_e_m.html">_CALLBACK_ITEM</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">该结构用来给调用者注册的回调函数传递参数。  <a href="struct_c_private_cloud_1_1___c_a_l_l_b_a_c_k___i_t_e_m.html#details">更多...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:abbf40043f92ee0c584c4b5ba4040afbc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abbf40043f92ee0c584c4b5ba4040afbc"></a>
typedef struct <br class="typebreak"/>
<a class="el" href="struct_c_private_cloud_1_1___c_a_l_l_b_a_c_k___i_t_e_m.html">CPrivateCloud::_CALLBACK_ITEM</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_private_cloud.html#abbf40043f92ee0c584c4b5ba4040afbc">CALLBACK_ITEM</a></td></tr>
<tr class="memdesc:abbf40043f92ee0c584c4b5ba4040afbc"><td class="mdescLeft">&#160;</td><td class="mdescRight">该结构用来给调用者注册的回调函数传递参数。 <br/></td></tr>
<tr class="separator:abbf40043f92ee0c584c4b5ba4040afbc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84c910874ddd3ca2ceadc1af61a461e2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a84c910874ddd3ca2ceadc1af61a461e2"></a>
typedef struct <br class="typebreak"/>
<a class="el" href="struct_c_private_cloud_1_1___c_a_l_l_b_a_c_k___i_t_e_m.html">CPrivateCloud::_CALLBACK_ITEM</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>LPCALLBACK_ITEM</b></td></tr>
<tr class="separator:a84c910874ddd3ca2ceadc1af61a461e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:ad50bcea5d87fcebcc6de854e33fc5aa8"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_private_cloud.html#ad50bcea5d87fcebcc6de854e33fc5aa8">SetDeviceInformation</a> (LPCTSTR lpszDeviceId, LPCTSTR lpszDeviceName, LPCTSTR lpszDeviceType)</td></tr>
<tr class="separator:ad50bcea5d87fcebcc6de854e33fc5aa8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48c068e1a4a2ae6b77dbf68a68d6770f"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_private_cloud.html#a48c068e1a4a2ae6b77dbf68a68d6770f">RegisterCallback</a> (LPCLOUD_CALLBACK lpCallbackRoutine, DWORD_PTR lpContext)</td></tr>
<tr class="separator:a48c068e1a4a2ae6b77dbf68a68d6770f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a65af4d1c471c03991e81bcb3570223"><td class="memItemLeft" align="right" valign="top">DWORD&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_private_cloud.html#a1a65af4d1c471c03991e81bcb3570223">ConnectToCloud</a> (LPTSTR lpszCloudId, LPTSTR lpszCloudName, LPTSTR lpszPassword)</td></tr>
<tr class="separator:a1a65af4d1c471c03991e81bcb3570223"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1db3a91b8f848b8ab3d588118dcbee8"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_private_cloud.html#ae1db3a91b8f848b8ab3d588118dcbee8">IsCloudConnected</a> ()</td></tr>
<tr class="separator:ae1db3a91b8f848b8ab3d588118dcbee8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aebe6162ff9278fa1d2d004eeb45c7f24"><td class="memItemLeft" align="right" valign="top">DWORD&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_private_cloud.html#aebe6162ff9278fa1d2d004eeb45c7f24">ConnectToDevice</a> (long ip)</td></tr>
<tr class="separator:aebe6162ff9278fa1d2d004eeb45c7f24"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab7746b028a7ccc162baa8400fdfaea0"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_private_cloud.html#aab7746b028a7ccc162baa8400fdfaea0">DisconnectFromDevice</a> (long ip)</td></tr>
<tr class="separator:aab7746b028a7ccc162baa8400fdfaea0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25d0d17d6f72e28c1bf424350afc51ca"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_private_cloud.html#a25d0d17d6f72e28c1bf424350afc51ca">DisconnectAll</a> ()</td></tr>
<tr class="separator:a25d0d17d6f72e28c1bf424350afc51ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70d3aa11bf4a97c3f83d0d75756e8f9f"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_private_cloud.html#a70d3aa11bf4a97c3f83d0d75756e8f9f">PostTask</a> (long ip, <a class="el" href="struct___c_l_o_u_d_m_s_g___h_d_r.html">LPCLOUDMSG_HDR</a> lpMsg)</td></tr>
<tr class="separator:a70d3aa11bf4a97c3f83d0d75756e8f9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acdbc34f7b51fd0f49d5c6da6b70f48f4"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_private_cloud.html#acdbc34f7b51fd0f49d5c6da6b70f48f4">Callback</a> (DWORD dwReason, long ip, DWORD_PTR lpBuffer)</td></tr>
<tr class="separator:acdbc34f7b51fd0f49d5c6da6b70f48f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa77a1eb114a0b67d501fd94a31be1a09"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_private_cloud.html#aa77a1eb114a0b67d501fd94a31be1a09">GetDeviceInformation</a> (long ip, LPTSTR lpszDeviceId, LPTSTR lpszDeviceName, LPTSTR lpszDeviceType)</td></tr>
<tr class="separator:aa77a1eb114a0b67d501fd94a31be1a09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c21b80a991cb62fea0e4ec9c7b4bed5"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_private_cloud.html#a7c21b80a991cb62fea0e4ec9c7b4bed5">IsDeviceConnected</a> (long ip)</td></tr>
<tr class="separator:a7c21b80a991cb62fea0e4ec9c7b4bed5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab52f455585c71455e3d43fb08309b995"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_private_cloud.html#ab52f455585c71455e3d43fb08309b995">GetConnectedDeviceList</a> (long **pList, DWORD &amp;dwCount)</td></tr>
<tr class="separator:ab52f455585c71455e3d43fb08309b995"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acad97abcb56e45d7c390db3c640a2d48"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_private_cloud.html#acad97abcb56e45d7c390db3c640a2d48">FreeConnectedDeviceList</a> (long *pList)</td></tr>
<tr class="separator:acad97abcb56e45d7c390db3c640a2d48"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a23cac5b8cfe05e35f4d6b7fc3af850cb"><td class="memItemLeft" align="right" valign="top">static DWORD WINAPI&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_private_cloud.html#a23cac5b8cfe05e35f4d6b7fc3af850cb">UdpListenThread</a> (LPVOID lpContext)</td></tr>
<tr class="separator:a23cac5b8cfe05e35f4d6b7fc3af850cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2903b176ed596eae6596d91226dc7d7c"><td class="memItemLeft" align="right" valign="top">static DWORD WINAPI&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_private_cloud.html#a2903b176ed596eae6596d91226dc7d7c">TcpListenThread</a> (LPVOID lpContext)</td></tr>
<tr class="separator:a2903b176ed596eae6596d91226dc7d7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e3937dc09652ad844bea668e3ce7f60"><td class="memItemLeft" align="right" valign="top">static DWORD WINAPI&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_private_cloud.html#a5e3937dc09652ad844bea668e3ce7f60">MessageThread</a> (LPVOID lpContext)</td></tr>
<tr class="separator:a5e3937dc09652ad844bea668e3ce7f60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea9c86fcc435d166c3041eff138b3ac0"><td class="memItemLeft" align="right" valign="top">static DWORD WINAPI&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_private_cloud.html#aea9c86fcc435d166c3041eff138b3ac0">HeartbeatThread</a> (LPVOID lpContext)</td></tr>
<tr class="separator:aea9c86fcc435d166c3041eff138b3ac0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:aae6ffffb59c2a644cba5617f9fa9058e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aae6ffffb59c2a644cba5617f9fa9058e"></a>
TCHAR&#160;</td><td class="memItemRight" valign="bottom"><b>m_szDeviceId</b> [DEVICE_ID_LENGTH]</td></tr>
<tr class="separator:aae6ffffb59c2a644cba5617f9fa9058e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7da86df9358046649d644b94a7d9d4a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af7da86df9358046649d644b94a7d9d4a"></a>
TCHAR&#160;</td><td class="memItemRight" valign="bottom"><b>m_szDeviceName</b> [DEVICE_NAME_LENGTH]</td></tr>
<tr class="separator:af7da86df9358046649d644b94a7d9d4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0779c4fe95f254deb36bd9bc59a18fe"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa0779c4fe95f254deb36bd9bc59a18fe"></a>
TCHAR&#160;</td><td class="memItemRight" valign="bottom"><b>m_szDeviceType</b> [DEVICE_TYPE_LENGTH]</td></tr>
<tr class="separator:aa0779c4fe95f254deb36bd9bc59a18fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7781f07c3e0f6c21c7e0458e557b32b6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7781f07c3e0f6c21c7e0458e557b32b6"></a>
TCHAR&#160;</td><td class="memItemRight" valign="bottom"><b>m_szCloudId</b> [CLOUD_ID_LENGTH]</td></tr>
<tr class="separator:a7781f07c3e0f6c21c7e0458e557b32b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92043827f28fdbbc90f6cd0e85638a33"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a92043827f28fdbbc90f6cd0e85638a33"></a>
TCHAR&#160;</td><td class="memItemRight" valign="bottom"><b>m_szCloudName</b> [CLOUD_NAME_LENGTH]</td></tr>
<tr class="separator:a92043827f28fdbbc90f6cd0e85638a33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7f12b9e10896ec114542de2f72811b7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab7f12b9e10896ec114542de2f72811b7"></a>
TCHAR&#160;</td><td class="memItemRight" valign="bottom"><b>m_szPassword</b> [64]</td></tr>
<tr class="separator:ab7f12b9e10896ec114542de2f72811b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>管理私有云的类 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a class="anchor" id="acdbc34f7b51fd0f49d5c6da6b70f48f4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL CPrivateCloud::Callback </td>
          <td>(</td>
          <td class="paramtype">DWORD&#160;</td>
          <td class="paramname"><em>dwReason</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>ip</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">DWORD_PTR&#160;</td>
          <td class="paramname"><em>lpBuffer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>调用回调函数。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">dwReason</td><td>调用回调函数的原因。 </td></tr>
    <tr><td class="paramname">ip</td><td>对方设备的IP地址（已转换成网络字节序）。 </td></tr>
    <tr><td class="paramname">lpBuffer</td><td>具体的参数因回调函数的原因不同而不同。 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>TRUE表示成功，否则表示失败。 </dd></dl>
<dl class="section see"><dt>参见</dt><dd><a class="el" href="class_c_private_cloud.html#a48c068e1a4a2ae6b77dbf68a68d6770f">RegisterCallback()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a1a65af4d1c471c03991e81bcb3570223"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DWORD CPrivateCloud::ConnectToCloud </td>
          <td>(</td>
          <td class="paramtype">LPTSTR&#160;</td>
          <td class="paramname"><em>lpszCloudId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPTSTR&#160;</td>
          <td class="paramname"><em>lpszCloudName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPTSTR&#160;</td>
          <td class="paramname"><em>lpszPassword</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>连接到云，连接到云后即可和云中的其他设备建立连接。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">lpszCloudId</td><td>私有云的ID。 </td></tr>
    <tr><td class="paramname">lpszCloudName</td><td>私有云的名称。 </td></tr>
    <tr><td class="paramname">lpszPassword</td><td>私有云的访问密码。 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>同GetLastError。 </dd></dl>
<dl class="section see"><dt>参见</dt><dd></dd></dl>

</div>
</div>
<a class="anchor" id="aebe6162ff9278fa1d2d004eeb45c7f24"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DWORD CPrivateCloud::ConnectToDevice </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>ip</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>连接到某个云设备，连接到云设备后即可和该设备进行交互。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">ip</td><td>该云设备的IP地址（已转换成网络字节序）。 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>同GetLastError。 </dd></dl>
<dl class="section see"><dt>参见</dt><dd><a class="el" href="class_c_private_cloud.html#a1a65af4d1c471c03991e81bcb3570223">ConnectToCloud()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a25d0d17d6f72e28c1bf424350afc51ca"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID CPrivateCloud::DisconnectAll </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>断开所有连接，注意：该函数不能在回调函数中直接调用。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">无。</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>无。 </dd></dl>
<dl class="section see"><dt>参见</dt><dd><a class="el" href="class_c_private_cloud.html#a1a65af4d1c471c03991e81bcb3570223">ConnectToCloud()</a> <a class="el" href="class_c_private_cloud.html#aebe6162ff9278fa1d2d004eeb45c7f24">ConnectToDevice()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aab7746b028a7ccc162baa8400fdfaea0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID CPrivateCloud::DisconnectFromDevice </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>ip</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>断开和某个云设备的连接，注意：该函数不能在回调函数中直接调用。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">ip</td><td>该云设备的IP地址（已转换成网络字节序）。 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>无。 </dd></dl>
<dl class="section see"><dt>参见</dt><dd><a class="el" href="class_c_private_cloud.html#aebe6162ff9278fa1d2d004eeb45c7f24">ConnectToDevice()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="acad97abcb56e45d7c390db3c640a2d48"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID CPrivateCloud::FreeConnectedDeviceList </td>
          <td>(</td>
          <td class="paramtype">long *&#160;</td>
          <td class="paramname"><em>pList</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>释放当前连接的设备IP列表。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">pList</td><td>IP地址列表。 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>无。 </dd></dl>
<dl class="section see"><dt>参见</dt><dd><a class="el" href="class_c_private_cloud.html#ab52f455585c71455e3d43fb08309b995">GetConnectedDeviceList()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ab52f455585c71455e3d43fb08309b995"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID CPrivateCloud::GetConnectedDeviceList </td>
          <td>(</td>
          <td class="paramtype">long **&#160;</td>
          <td class="paramname"><em>pList</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">DWORD &amp;&#160;</td>
          <td class="paramname"><em>dwCount</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>获取当前连接的设备IP列表。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">ip</td><td>该设备的IP地址（已转换成网络字节序）。 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>无。 </dd></dl>
<dl class="section see"><dt>参见</dt><dd><a class="el" href="class_c_private_cloud.html#acad97abcb56e45d7c390db3c640a2d48">FreeConnectedDeviceList()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aa77a1eb114a0b67d501fd94a31be1a09"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL CPrivateCloud::GetDeviceInformation </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>ip</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPTSTR&#160;</td>
          <td class="paramname"><em>lpszDeviceId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPTSTR&#160;</td>
          <td class="paramname"><em>lpszDeviceName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPTSTR&#160;</td>
          <td class="paramname"><em>lpszDeviceType</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>获取某个云设备信息。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">ip</td><td>该设备的IP地址（已转换成网络字节序）。 </td></tr>
    <tr><td class="paramname">lpszDeviceId</td><td>该设备的ID。 </td></tr>
    <tr><td class="paramname">lpszDeviceName</td><td>该设备的名称。 </td></tr>
    <tr><td class="paramname">lpszDeviceType</td><td>该设备的类型。 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>TRUE表示成功，否则表示失败。 </dd></dl>
<dl class="section see"><dt>参见</dt><dd></dd></dl>

</div>
</div>
<a class="anchor" id="aea9c86fcc435d166c3041eff138b3ac0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">DWORD WINAPI CPrivateCloud::HeartbeatThread </td>
          <td>(</td>
          <td class="paramtype">LPVOID&#160;</td>
          <td class="paramname"><em>lpContext</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>用来定时发送心跳消息的线程。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">lpContext</td><td>指向CPrivateCloud的指针。 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>无意义。 </dd></dl>
<dl class="section see"><dt>参见</dt><dd><a class="el" href="class_c_private_cloud.html">CPrivateCloud</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ae1db3a91b8f848b8ab3d588118dcbee8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL CPrivateCloud::IsCloudConnected </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>是否已经连接到云。</p>
<dl class="section return"><dt>返回</dt><dd>TRUE表示已经连接，FALSE表示未连接。 </dd></dl>
<dl class="section see"><dt>参见</dt><dd><a class="el" href="class_c_private_cloud.html#a1a65af4d1c471c03991e81bcb3570223">ConnectToCloud()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a7c21b80a991cb62fea0e4ec9c7b4bed5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL CPrivateCloud::IsDeviceConnected </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>ip</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>是否和某个云设备建立了连接。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">ip</td><td>该设备的IP地址（已转换成网络字节序）。 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>TRUE表示建立了连接，否则表示未建立连接。 </dd></dl>
<dl class="section see"><dt>参见</dt><dd></dd></dl>

</div>
</div>
<a class="anchor" id="a5e3937dc09652ad844bea668e3ce7f60"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">DWORD WINAPI CPrivateCloud::MessageThread </td>
          <td>(</td>
          <td class="paramtype">LPVOID&#160;</td>
          <td class="paramname"><em>lpContext</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>用来处理和私有云中其它设备通信的线程。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">lpContext</td><td>指向CPrivateCloud的指针。 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>无意义。 </dd></dl>
<dl class="section see"><dt>参见</dt><dd><a class="el" href="class_c_private_cloud.html">CPrivateCloud</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a70d3aa11bf4a97c3f83d0d75756e8f9f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL CPrivateCloud::PostTask </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>ip</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct___c_l_o_u_d_m_s_g___h_d_r.html">LPCLOUDMSG_HDR</a>&#160;</td>
          <td class="paramname"><em>lpMsg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>发送任务给某个云设备。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">ip</td><td>该云设备的IP地址（已转换成网络字节序）。 </td></tr>
    <tr><td class="paramname">lpMsg</td><td>发送给该设备的消息包。 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>TRUE表示添加消息到消息队列成功，否则表示失败（可能与该设备未建立连接）。 </dd></dl>
<dl class="section see"><dt>参见</dt><dd></dd></dl>

</div>
</div>
<a class="anchor" id="a48c068e1a4a2ae6b77dbf68a68d6770f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID CPrivateCloud::RegisterCallback </td>
          <td>(</td>
          <td class="paramtype">LPCLOUD_CALLBACK&#160;</td>
          <td class="paramname"><em>lpCallbackRoutine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">DWORD_PTR&#160;</td>
          <td class="paramname"><em>lpContext</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>注册回调函数，和其他设备交互时会通过回调函数通知调用者。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">lpCallbackRoutine</td><td>回掉函数的地址。 </td></tr>
    <tr><td class="paramname">lpContext</td><td>调用者传入的回调参数，调用回调函数时会把此参数传递给回调函数。 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>无。 </dd></dl>
<dl class="section see"><dt>参见</dt><dd>LPCLOUD_CALLBACK </dd></dl>

</div>
</div>
<a class="anchor" id="ad50bcea5d87fcebcc6de854e33fc5aa8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID CPrivateCloud::SetDeviceInformation </td>
          <td>(</td>
          <td class="paramtype">LPCTSTR&#160;</td>
          <td class="paramname"><em>lpszDeviceId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPCTSTR&#160;</td>
          <td class="paramname"><em>lpszDeviceName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPCTSTR&#160;</td>
          <td class="paramname"><em>lpszDeviceType</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置本设备的相关信息，和其他设备交互时发送给对方。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">lpszDeviceId</td><td>本设备的ID。 </td></tr>
    <tr><td class="paramname">lpszDeviceName</td><td>本设备的名称。 </td></tr>
    <tr><td class="paramname">lpszDeviceType</td><td>本设备的类型。 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>无意义。 </dd></dl>
<dl class="section see"><dt>参见</dt><dd></dd></dl>

</div>
</div>
<a class="anchor" id="a2903b176ed596eae6596d91226dc7d7c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">DWORD WINAPI CPrivateCloud::TcpListenThread </td>
          <td>(</td>
          <td class="paramtype">LPVOID&#160;</td>
          <td class="paramname"><em>lpContext</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>用来监听网络中TCP连接的线程。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">lpContext</td><td>指向CPrivateCloud的指针。 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>无意义。 </dd></dl>
<dl class="section see"><dt>参见</dt><dd><a class="el" href="class_c_private_cloud.html">CPrivateCloud</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a23cac5b8cfe05e35f4d6b7fc3af850cb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">DWORD WINAPI CPrivateCloud::UdpListenThread </td>
          <td>(</td>
          <td class="paramtype">LPVOID&#160;</td>
          <td class="paramname"><em>lpContext</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>用来监听网络中UDP组播消息的线程。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">lpContext</td><td>指向CPrivateCloud的指针。 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>无意义。 </dd></dl>
<dl class="section see"><dt>参见</dt><dd><a class="el" href="class_c_private_cloud.html">CPrivateCloud</a> </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>F:/cvs/projects/rd1/taiping/Cloud/<a class="el" href="_private_cloud_8h_source.html">PrivateCloud.h</a></li>
<li>F:/cvs/projects/rd1/taiping/Cloud/PrivateCloud.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_c_private_cloud.html">CPrivateCloud</a></li>
    <li class="footer">生成于 2013年 五月 3日 星期五 11:19:07 , 为 Private Cloud使用 
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.3.1 </li>
  </ul>
</div>
</body>
</html>
